@extends('admin.layout')

@section('title', $title)

@section('content')
	<div class="content-wrapper" style="min-height: 946px;">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                公告管理
                <small>公告编辑</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
                <li><a href="#">公告管理</a></li>
                <li class="active">公告编辑</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">

                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class='box'>
                        <div class="box box-primary">
                            <div class="box-header">
                                <h3 class="box-title">公告编辑</h3>
                        </div><!-- /.box-header -->
                    </div>
                    @if (session('info'))
                                <div id='error'>                        
                                    <div class="alert alert-danger">         
                                            <p>{{ session('info') }}</p>                                 
                                    </div>
                                </div>
                            @endif
                        <!-- form start -->
                        <form role="form" action="{{ url('/admin/notice/update') }}/{{ $data -> id }}" method="post">
                        	{{ csrf_field()}}
                            <div class="box-body">
		                         <div class="form-group">
		                            <label for="exampleInputEmail1">公告标题:</label>
		                            <input type='text' name='title' value="{{ $data -> title }}">
		                         </div>                          
                                <div class="form-group">
                                    <label for="exampleInputEmail1">公告内容:</label>
                                </div>
                                <!-- 公告内容 -->
                            <div class="box-body">
                              <!-- 加载编辑器的容器 -->
                                <script id="container" name="content" type="text/plain" style="width:100%" >{!! $data -> content !!}</script>
                                <!-- 配置文件 -->
                                <script type="text/javascript" src="{{ asset('/ue/ueditor.config.js') }}"></script>
                                <!-- 编辑器源码文件 -->
                                <script type="text/javascript" src="{{ asset('/ue/ueditor.all.js') }}"></script>
                                <!-- 实例化编辑器 -->
                                <script type="text/javascript">
                                    var ue = UE.getEditor('container');
                                </script>                               
                             </div>
                            
                                <div class="form-group">
                                	<label for="exampleInputFile">是否显示</label>
									<div class="radio">
                                        <label>
                                            <input type="radio" name="status" value="1">是
                                        </label>
                                        <label>
                                            <input type="radio" name="status" value="0">否
                                        </label>
                                    </div>
                                </div>
                                               
                            </div><!-- /.box-body -->

							<div class="box-footer">
                                <button type="submit" class="btn btn-primary">编辑</button>
                                 <button type="reset" class="btn btn-primary-default">重置</button>
                            </div>
                        </form>
                    </div><!-- /.box -->
                </div><!--/.col (left) -->
                <!-- right column -->
            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div>
 <!-- 切换的代码 -->
 <script type="text/javascript">
 	window.onload=function()
 	{
 	
 	}

 </script>
@endsection